<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <link rel="stylesheet" href="" media="(min-width: 500px) and (max-width:600px)"> -->
</head>
<!-- <style media="(min-width: 500px) and (max-width:600px)">
    #div0{
        width: 100px;
        height: 200px;
    }
    @media screen and (min-width:500px)  and (max-width:700px){
        #div0{
            background-color: red;
        }
    }
    @media screen and (min-width:701px){
        #div0{
            background-color: blue;
        }
    }
</style> -->
<script>
    var c=()=>{
        let w = document.documentElement.clientWidth; /*获取设备的宽度 */
        let n = (20*(w)/320)>40?40+"px":(20*(w)/320)+"px";
        document.documentElement.style.fontSize=n;
    }
    window.addEventListener("load",c);
    window.addEventListener("resize",c);
</script>
<style>
</style>
<body>
    <div>
        1233
    </div>
</body>
</html>